<!--<?php
if($uid == $winduid){print <<<EOT
-->
  <script src="js/pw_drag.js"></script>
  <div id="mode_savebar" style="display:none; position:absolute">
  	<div class="menu_sm">
  		<img  src="theme/$style/images/save.jpg" /><a href="javascript:;" onclick="saveMode()">保存布局</a><img src="theme/$style/images/close.jpg" /><a href="javascript:;" onclick="c_savemode()">取消</a>
  	</div>
  </div>
<!--
EOT;
}
print<<<EOT
-->
  <div id="side" class="left">
<!--
EOT;
foreach($side_order as $sign=>$side){
	@include getPath($getpath[$sign]);
}print <<<EOT
-->
  </div>
<script language="JavaScript">
var agt = navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
function upleft(id){
	var obj  = GE('bloglist');
	var objs = obj.getElementsByTagName('li');
	for (var i=0;i<objs.length;i++) {
		if (objs[i].lastChild.tagName == 'UL') {
			if (objs[i].id==id) {
				if (objs[i].lastChild.style.display != 'none') {
					objs[i].lastChild.style.display = 'none';
				} else {
					objs[i].lastChild.style.display = '';
				}
			} else {
				objs[i].lastChild.style.display = 'none';
			}
		}
	}
}
function cgpic(aid){
	var obj  = GE('photo_img');
	var obja = obj.getElementsByTagName('a');
	var objimg = obja[0].getElementsByTagName('img');
	var newaid = GE(aid).src;
	if (GE(aid).src) {
		newaid = newaid.replace(/\_thumb/ig,'');
		if (objimg[0].src=='' || objimg[0].src != newaid) {
			objimg[0].src = newaid;
		}
		
		if (obja[0].href != objimg[0].src) {
			obja[0].href = objimg[0].src;
		}
	}
	return;
}
function externallinks() {
	if (!document.getElementsByTagName) {
		return;
	}
 	var obja = document.getElementsByTagName("a");
	for (var i=0; i<obja.length; i++) {
		var obj = obja[i];
		if (obj.getAttribute("href") && obj.getAttribute("rel") == "external") {
			obj.target = "_blank";
		}
	}
}
function saveMode(){
	var o = GE('side');
	var v = Array();
	var data = '';
	var boxes = o.getElementsByTagName('div');
	for(var i=0;i<boxes.length;i++){
		if(boxes[i].id.substr(0,5) == 'side_'){
			if(data == ''){
				data = 'boxes='+boxes[i].id.substr(5);
			} else{
				data += ','+boxes[i].id.substr(5);
			}
		}
	}
   var url = ajaxurl + '?action=savemode';
   send_request(url,saveModeResponse,data);
}

function saveModeResponse(){
	var msg = http_request.responseText;
	if(msg == 'success'){
		alert('布局修改成功');
		Drag.savebar = null;
		closem ();
	}else{
		alert('布局修改失败');
	}
}

function c_savemode(){
	Drag.savebar = null;
	closem ();
}
</script>
<!--
EOT;
?>
-->
